package d3_com.itheima.exception;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Test2 {
    public static void main(String[] args) {
        try {
            Test1();
        } catch (FileNotFoundException e) {
            System.out.println("文件不存在~");
            e.printStackTrace();
        } catch (ParseException e) {
            System.out.println("时间格式不正确~");
            e.printStackTrace();
        }
    }

    public static void Test1() throws FileNotFoundException, ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date d = sdf.parse("2029-11-11 10:24:00");
        System.out.println(d);
        Test2();
    }

    public static void Test2() throws FileNotFoundException {
        InputStream is = new FileInputStream("D:/meinv.png");
    }
}
